#ifndef _UTILSTRUCT_H_
#define _UTILSTRUCT_H_

typedef struct _tagUICHILD{
    HWND    hWnd;
	POINT   pt;
	SIZE    sz;
} UICHILD, NEAR *PUICHILD, FAR *LPUICHILD;

typedef struct _tagUIEXTRA{
    UICHILD  uiStatus;
    UICHILD  uiCand;
	UICHILD  uiComp;
} UIEXTRA, NEAR *PUIEXTRA, FAR *LPUIEXTRA;

typedef struct _tagGENEMSG{
    UINT msg;
    WPARAM wParam;
    LPARAM lParam;
} GENEMSG, NEAR *PGENEMSG, FAR *LPGENEMSG;

typedef struct _tagUSRINPUT{
	TCHAR baseCode[BASE_CODE_LEN]; // store base unit code
	BOOL op_YIN;
	TCHAR YIN;
	BOOL op_STROKE;
	BYTE STROKE;
}USRINPUT,NEAR *PUSRINPUT,FAR *LPUSRINPUT;

typedef struct _tagMYCOMPSTR{
    COMPOSITIONSTRING cs;
	TCHAR szCompStr[MAX_INPUT * BASE_CODE_LEN];
	TCHAR szResultStr[MAXCOMPSTRLEN];
	USRINPUT input[MAX_INPUT];
	UINT inputLen;	
} MYCOMPSTR, NEAR *PMYCOMPSTR, FAR *LPMYCOMPSTR;

typedef struct _tagMYCAND{
    CANDIDATEINFO  ci;
    CANDIDATELIST  cl;
	TCHAR szCandStr[MAXCANDIDATENUM][CANDIDATESTR_MAX_LEN];
} MYCAND, NEAR *PMYCAND, FAR *LPMYCAND;

typedef struct _tagKNOWLEDGE{
	TCHAR wordCode[CODE_MAX_LEN];
	TCHAR pinYin;
	UINT frequency;
	TCHAR word[CHN_WORD_LEN];
} KNOWLEDGE, NEAR *PKNOWLEDGE, FAR *LPKNOWLEDGE;

typedef struct _tagKNOWLEDGEIMMAP{
	UINT dwSize;
	UINT dwCodeOffset;
	UINT dwCodeLen;
	TCHAR pinYin;
	UINT frequency;
	TCHAR word[CHN_WORD_LEN];
} KNOWLEDGEIMMAP, NEAR *PKNOWLEDGEIMMAP, FAR *LPKNOWLEDGEIMMAP;

typedef struct _tagBaseFreq{
	TCHAR baseUnit[BASE_CODE_LEN];
	UINT frequency;
}BaseFreq, NEAR *PBaseFreq, FAR *LPBaseFreq;

#endif
